package db

import (
	"github.com/jinzhu/gorm"
)

// Case 案件模型
type Case struct {
	gorm.Model
	Title       string `gorm:"type:varchar(255);not null"`
	Description string `gorm:"type:text;not null"`
	Status      int    `gorm:"default:0"`
	UserID      int    `gorm:"not null"`
}

// DataManage 资料管理模型
type DataManage struct {
	gorm.Model
	CaseId      int `gorm:"not null"`
	Amount      int `gorm:"not null"`
	UpdateCount int `gorm:"not null"`
	Status      int `gorm:"default:0"`
}

// DocGen 文书管理模型
type DocGen struct {
	gorm.Model
	CaseId      int `gorm:"not null"`
	Amount      int `gorm:"not null"`
	UpdateCount int `gorm:"not null"`
	Status      int `gorm:"default:0"`
}

// MediaGuide 调解指导模型
type MediaGuide struct {
	gorm.Model
	CaseId      int `gorm:"not null"`
	IsAccept    int `gorm:"not null"`
	UpdateCount int `gorm:"not null"`
	Status      int `gorm:"default:0"`
}

// TrialGuide 庭审指导模型
type TrialGuide struct {
	gorm.Model
	CaseId      int `gorm:"not null"`
	IsSuccess   int `gorm:"not null"`
	UpdateCount int `gorm:"not null"`
	Status      int `gorm:"default:0"`
}

// OrderManage 订单管理模型
type OrderManage struct {
	gorm.Model
	CaseId      int     `gorm:"not null"`
	OrderId     string  `gorm:"not null"`
	OrderAmount float32 `gorm:"type:float;not null"`
	PayImg      string
	PayStatus   int `gorm:"not null"`
	UpdateCount int `gorm:"not null"`
	Status      int `gorm:"default:0"`
}
